import java.util.Scanner;

/**
 * @author caesar
 * @date 2025/6/30
 * @apiNote
 */
//从键盘输入整数，输入0结束，统计输入的正数、负数的个数。
public interface homework1_4 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int positive = 0;
        int negative = 0;
        while(true){
            System.out.print("请输入整数：");
            int num = input.nextInt();
            if(num == 0){
                break;
            }else if(num > 0){
                //System.out.println("正数");
                positive++;
            }else{
                //System.out.println("负数");
                negative++;
            }
        }
        System.out.println("正数个数：" + positive);
        System.out.println("负数个数：" + negative);

        input.close();
    }
}
